package com.cz.zslu.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 商品分类
 * </p>
 *
 * @author 森森
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("zsl_store_commodity_type")
public class ZslStoreCommodityType extends SuperEntity<ZslStoreCommodityType> {

    private static final long serialVersionUID = 1L;

    /**
     * 是否删除 0：有效，1 删除
     */
    @JSONField(serialize = false)
    @TableLogic
    @JsonIgnore
    private Integer state = 0;
    /**
     * 名称
     */
    @ApiModelProperty("名称")
    private String name;
    /**
     * 上级id
     */
    @ApiModelProperty("上级id")
    private Long pid;

    /**
     * 下级
     */
    @ApiModelProperty("下级")
    @TableField(exist = false)
    private List<ZslStoreCommodityType> subordinate = Lists.newArrayList();
    
}
